package string;

import static javafx.scene.input.KeyCode.Z;

public class MathesDemo {
    public static void main(String[] args) {
        /*邮箱正则表达式
        [a-zA-Z0-9]+@[a-zA-Z0-9]+(\.[a-zA-Z]+)+*/
        String email="huxiaowen@qq.com";
        String match="[a-zA-Z0-9]+@[a-zA-Z0-9]+(\\.[a-zA-Z]+)+";
        boolean flag=email.matches(match);
        if (flag){
            System.out.println("邮箱格式正确");
        }else{
            System.out.println("邮箱格式错误");
        }
    }
}
